// 任务管理
<template>
  <div>
    <!-- //搜索框 -->
    <el-form :inline="true" :model="formInline" class="demo-form-inline" style="margin-bottom:30px">
      <div style="float:left" id="bigbox">
        <el-form-item label="任务名称" style="float:left">
          <el-input v-model="formInline.misson" placeholder="请输入"></el-input>
        </el-form-item>
        <el-form-item label="创建人" style="float:left">
          <el-input v-model="formInline.user" placeholder="请输入"></el-input>
        </el-form-item>
        <el-form-item label="创建日期1" style="float:left">
          <el-col :span="20">
            <el-date-picker type="date" placeholder="请选择" v-model="formInline.date1" style="width: 100%;">
            </el-date-picker>
          </el-col>
        </el-form-item>
        <el-form-item label="任务状态11" style="float:left">
          <el-select v-model="formInline.state" placeholder="请输入">
            <el-option label="待提交" value="waitsubmit"></el-option>
            <el-option label="待审核" value="waitlook"></el-option>
            <el-option label="已完成" value="done"></el-option>
            <el-option label="审核拒绝" value="refuse"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item style="float:left">
          <el-button type="primary" @click="onSubmit">查询</el-button>
          <el-button>重置</el-button>
        </el-form-item>
      </div>
    </el-form>
    <!-- 表单 -->
    <div id="secbox">
      <el-table :data="tableData" border style="width: 100%">
        <el-table-column fixed prop="id" label="序号" width="80"></el-table-column>
        <el-table-column prop="state" label="任务状态" width="140"></el-table-column>
        <el-table-column prop="mname" label="任务名称" width="140"></el-table-column>
        <el-table-column prop="ddl" label="截止日期" width="170"></el-table-column>
        <el-table-column prop="person" label="创建人" width="120"></el-table-column>
        <el-table-column prop="creatdate" label="创建日期" width="170"></el-table-column>
        <el-table-column fixed="right" label="操作" width="250">
          <template slot-scope="scope">
            <el-button @click="handleClick(scope.row)" type="text" size="small">查看详情</el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>

    <!-- 分页 -->
    <el-pagination background layout="prev, pager, next" :total="15" style="margin-top:30px"></el-pagination>
  </div>
</template>
<style src="../style/task.css"></style>
<script>
export default {
  data () {
    return {
      tableData: [
        {
          id: "1",
          state: "待处理",
          mname: "劳务采购任务",
          ddl: "2016-05-02",
          person: "张三",
          creatdate: "2016 - 05 - 02"
        },
        {
          id: "2",
          state: "已完成",
          mname: "过程签证任务",
          ddl: "2016-05-02",
          person: "李四",
          creatdate: "2016 - 05 - 02"
        },
        {
          id: "3",
          state: "已完成",
          mname: "材料采购任务",
          ddl: "2016-05-02",
          person: "李四",
          creatdate: "2016 - 05 - 02"
        },
        {
          id: "4",
          state: "已完成",
          mname: "图纸深化任务",
          ddl: "2016-05-02",
          person: "李四",
          creatdate: " 2016 - 05 - 02"
        }
      ],
      formInline: {
        misson: "",
        user: "",
        date1: "",
        state: ""
      }
    };
  },
  methods: {
    handleClick (row) {
      console.log(row);
    },
    onSubmit () {
      console.log("submit!");
    }
  },
  created () { },
  mounted () { },
  computed: {}
};
</script>

<style scoped lang="less">
</style>
